inherited fmOkazatelUslugSelect: TfmOkazatelUslugSelect
  Left = 478
  Top = 214
  Width = 922
  Height = 766
  Caption = 'fmOkazatelUslugSelect'
  Constraints.MinHeight = 766
  Constraints.MinWidth = 600
  OnShow = FormShow
  PixelsPerInch = 96
  TextHeight = 13
  inherited sbBottom: TStatusBar
    Top = 712
    Width = 914
  end
  inherited Panel1: TPanel
    Width = 914
    inherited BitBtn1: TBitBtn
      Left = 744
    end
    inherited BitBtn2: TBitBtn
      Left = 832
    end
  end
  object Panel: TPanel [2]
    Left = 0
    Top = 45
    Width = 914
    Height = 667
    Align = alClient
    TabOrder = 2
    object dxBarDockControl1: TdxBarDockControl
      Left = 1
      Top = 1
      Width = 912
      Height = 26
      Align = dalTop
      BarManager = dxBarManager1
    end
    object dbtl: TcxDBTreeList
      Left = 1
      Top = 73
      Width = 408
      Height = 593
      Align = alLeft
      Bands = <
        item
        end>
      BufferedPaint = False
      DataController.DataSource = dlgDS
      DataController.ParentField = 'SDPARID'
      DataController.KeyField = 'SDID'
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clWindowText
      Font.Height = -15
      Font.Name = 'Tahoma'
      Font.Style = []
      LookAndFeel.Kind = lfOffice11
      LookAndFeel.NativeStyle = False
      LookAndFeel.SkinName = ''
      OptionsBehavior.ImmediateEditor = False
      OptionsBehavior.DragFocusing = True
      OptionsBehavior.ExpandOnDblClick = False
      OptionsBehavior.Sorting = False
      OptionsBehavior.MultiSort = False
      OptionsData.Editing = False
      OptionsData.Deleting = False
      OptionsView.CellAutoHeight = True
      OptionsView.CellEndEllipsis = True
      OptionsView.ColumnAutoWidth = True
      OptionsView.Headers = False
      ParentFont = False
      RootValue = -1
      Styles.Content = DMInv.cxData
      TabOrder = 1
      OnClick = dbtlClick
      OnCustomDrawCell = dbtlCustomDrawCell
      OnDragOver = dbtlDragOver
      object cxDBTreeList1cxDBTreeListColumn1: TcxDBTreeListColumn
        Styles.Content = DMInv.cxData
        DataBinding.FieldName = 'SDNAME'
        Width = 100
        Position.ColIndex = 0
        Position.RowIndex = 0
        Position.BandIndex = 0
      end
    end
    object Panel2: TPanel
      Left = 1
      Top = 27
      Width = 912
      Height = 46
      Align = alTop
      TabOrder = 2
      TabStop = True
      Visible = False
      object edSDNAME: TcxDBTextEdit
        Left = 9
        Top = 13
        DataBinding.DataField = 'SDNAME'
        DataBinding.DataSource = dlgDS
        TabOrder = 0
        Width = 250
      end
      object btSave: TBitBtn
        Left = 280
        Top = 10
        Width = 92
        Height = 25
        Caption = #1057#1086#1093#1088#1072#1085#1080#1090#1100
        Default = True
        TabOrder = 2
        OnClick = btSaveClick
        Glyph.Data = {
          DE010000424DDE01000000000000760000002800000024000000120000000100
          0400000000006801000000000000000000001000000000000000000000000000
          80000080000000808000800000008000800080800000C0C0C000808080000000
          FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF00333333333333
          3333333333333333333333330000333333333333333333333333F33333333333
          00003333344333333333333333388F3333333333000033334224333333333333
          338338F3333333330000333422224333333333333833338F3333333300003342
          222224333333333383333338F3333333000034222A22224333333338F338F333
          8F33333300003222A3A2224333333338F3838F338F33333300003A2A333A2224
          33333338F83338F338F33333000033A33333A222433333338333338F338F3333
          0000333333333A222433333333333338F338F33300003333333333A222433333
          333333338F338F33000033333333333A222433333333333338F338F300003333
          33333333A222433333333333338F338F00003333333333333A22433333333333
          3338F38F000033333333333333A223333333333333338F830000333333333333
          333A333333333333333338330000333333333333333333333333333333333333
          0000}
        NumGlyphs = 2
      end
      object btCancel: TBitBtn
        Left = 384
        Top = 10
        Width = 89
        Height = 25
        Cancel = True
        Caption = #1054#1090#1084#1077#1085#1080#1090#1100
        TabOrder = 1
        OnClick = btCancelClick
        Glyph.Data = {
          DE010000424DDE01000000000000760000002800000024000000120000000100
          0400000000006801000000000000000000001000000000000000000000000000
          80000080000000808000800000008000800080800000C0C0C000808080000000
          FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF00333333333333
          333333333333333333333333000033338833333333333333333F333333333333
          0000333911833333983333333388F333333F3333000033391118333911833333
          38F38F333F88F33300003339111183911118333338F338F3F8338F3300003333
          911118111118333338F3338F833338F3000033333911111111833333338F3338
          3333F8330000333333911111183333333338F333333F83330000333333311111
          8333333333338F3333383333000033333339111183333333333338F333833333
          00003333339111118333333333333833338F3333000033333911181118333333
          33338333338F333300003333911183911183333333383338F338F33300003333
          9118333911183333338F33838F338F33000033333913333391113333338FF833
          38F338F300003333333333333919333333388333338FFF830000333333333333
          3333333333333333333888330000333333333333333333333333333333333333
          0000}
        NumGlyphs = 2
      end
    end
    object Panel3: TPanel
      Left = 417
      Top = 73
      Width = 496
      Height = 593
      Align = alClient
      BevelOuter = bvNone
      Caption = 'Panel3'
      TabOrder = 3
      object dxBarDockControl2: TdxBarDockControl
        Left = 0
        Top = 89
        Width = 496
        Height = 26
        Align = dalTop
        BarManager = dxBarManager1
      end
      object cxGrid1: TcxGrid
        Left = 0
        Top = 115
        Width = 496
        Height = 478
        Align = alClient
        Font.Charset = DEFAULT_CHARSET
        Font.Color = clWindowText
        Font.Height = -13
        Font.Name = 'Tahoma'
        Font.Style = []
        ParentFont = False
        TabOrder = 1
        LookAndFeel.Kind = lfStandard
        object tvJL: TcxGridDBTableView
          NavigatorButtons.ConfirmDelete = False
          NavigatorButtons.PriorPage.Visible = True
          NavigatorButtons.Next.Visible = True
          NavigatorButtons.Insert.Visible = True
          NavigatorButtons.Append.Visible = False
          NavigatorButtons.Edit.Visible = False
          NavigatorButtons.Post.Visible = True
          NavigatorButtons.Cancel.Visible = False
          NavigatorButtons.Refresh.Visible = False
          NavigatorButtons.SaveBookmark.Visible = False
          NavigatorButtons.GotoBookmark.Visible = False
          NavigatorButtons.Filter.Visible = False
          OnCellDblClick = tvJLCellDblClick
          DataController.DataSource = dsJL
          DataController.Summary.DefaultGroupSummaryItems = <>
          DataController.Summary.FooterSummaryItems = <
            item
              Format = '#,###0'
              Kind = skSum
              FieldName = 'CSAMOUNT'
            end>
          DataController.Summary.SummaryGroups = <>
          OptionsBehavior.CellHints = True
          OptionsCustomize.ColumnFiltering = False
          OptionsData.Appending = True
          OptionsData.CancelOnExit = False
          OptionsData.Editing = False
          OptionsView.CellEndEllipsis = True
          OptionsView.CellAutoHeight = True
          OptionsView.CellTextMaxLineCount = 1
          OptionsView.ColumnAutoWidth = True
          OptionsView.Footer = True
          OptionsView.GroupByBox = False
          OptionsView.HeaderEndEllipsis = True
          OptionsView.Indicator = True
          Preview.Visible = True
          Styles.Header = DMInv.cxSiniyText
          object tvJLJLID: TcxGridDBColumn
            Caption = 'ID'
            DataBinding.FieldName = 'JLID'
            Width = 40
          end
          object tvJLJLOPF: TcxGridDBColumn
            Caption = #1054#1055#1060
            DataBinding.FieldName = 'OPF_'
            Width = 96
          end
          object tvJLJLEGALNAME: TcxGridDBColumn
            Caption = #1070#1088'. '#1080#1084#1103
            DataBinding.FieldName = 'JLEGALNAME'
            Width = 158
          end
          object tvJLJLINN: TcxGridDBColumn
            Caption = #1048#1053#1053
            DataBinding.FieldName = 'JLINN'
            Width = 87
          end
          object tvJLJLOGRN: TcxGridDBColumn
            Caption = #1054#1043#1056#1053
            DataBinding.FieldName = 'JLOGRN'
            Width = 112
          end
          object tvJLJLLEGALADRESS: TcxGridDBColumn
            Caption = #1070#1088'. '#1072#1076#1088#1077#1089
            DataBinding.FieldName = 'JLLEGALADRESS'
            Width = 198
          end
          object tvJLJLCEONAME: TcxGridDBColumn
            Caption = #1056#1091#1082#1086#1074#1086#1076#1080#1090#1077#1083#1100
            DataBinding.FieldName = 'JLCEONAME'
            Width = 164
          end
          object tvJLJLNOTE: TcxGridDBColumn
            Caption = #1050#1086#1084#1084#1077#1085#1090#1072#1088#1080#1081
            DataBinding.FieldName = 'JLNOTE'
            Width = 160
          end
          object tvJLLINK_SPISOK: TcxGridDBColumn
            Caption = #1055#1088#1080#1074#1103#1079#1082#1072' '#1082' '#1086#1082#1072#1079#1072#1090#1077#1083#1103#1084' '#1091#1089#1083#1091#1075
            DataBinding.FieldName = 'LINK_SPISOK'
            Width = 164
          end
        end
        object cxGridLevel5: TcxGridLevel
          GridView = tvJL
        end
      end
      object Panel4: TPanel
        Left = 0
        Top = 0
        Width = 496
        Height = 89
        Align = alTop
        TabOrder = 2
        object teTarget: TcxTextEdit
          Left = 8
          Top = 24
          ParentFont = False
          Properties.OnChange = teTargetPropertiesChange
          Style.Font.Charset = DEFAULT_CHARSET
          Style.Font.Color = clWindowText
          Style.Font.Height = -15
          Style.Font.Name = 'Tahoma'
          Style.Font.Style = []
          Style.Shadow = True
          Style.IsFontAssigned = True
          TabOrder = 0
          Width = 265
        end
        object cxLabel3: TcxLabel
          Left = 8
          Top = 5
          Caption = #1057#1090#1088#1086#1082#1072' '#1087#1086#1080#1089#1082#1072
          ParentFont = False
          Style.Font.Charset = DEFAULT_CHARSET
          Style.Font.Color = clGray
          Style.Font.Height = -11
          Style.Font.Name = 'Tahoma'
          Style.Font.Style = []
          Style.IsFontAssigned = True
        end
        object rbName: TcxRadioButton
          Left = 24
          Top = 64
          Width = 113
          Height = 17
          Caption = #1087#1086' '#1085#1072#1079#1074#1072#1085#1080#1102
          Enabled = False
          TabOrder = 2
        end
        object rbINN: TcxRadioButton
          Left = 120
          Top = 64
          Width = 113
          Height = 17
          Caption = #1087#1086' '#1048#1053#1053
          Checked = True
          TabOrder = 3
          TabStop = True
        end
        object bbSearch: TcxButton
          Left = 279
          Top = 25
          Width = 49
          Height = 25
          Caption = #1055#1086#1080#1089#1082
          TabOrder = 4
          OnClick = bbSearchClick
        end
      end
    end
    object cxSplitter1: TcxSplitter
      Left = 409
      Top = 73
      Width = 8
      Height = 593
      HotZoneClassName = 'TcxMediaPlayer9Style'
      Control = dbtl
    end
  end
  inherited dlgDS: TDataSource
    DataSet = qSD
    Left = 88
    Top = 88
  end
  object dxBarManager1: TdxBarManager
    Font.Charset = DEFAULT_CHARSET
    Font.Color = clWindowText
    Font.Height = -11
    Font.Name = 'Tahoma'
    Font.Style = []
    Categories.Strings = (
      'Default')
    Categories.ItemsVisibles = (
      2)
    Categories.Visibles = (
      True)
    ImageOptions.Images = DMInv.cxSmallImages
    NotDocking = [dsNone, dsLeft, dsTop, dsRight, dsBottom]
    PopupMenuLinks = <>
    UseSystemFont = True
    Left = 320
    Top = 143
    DockControlHeights = (
      0
      0
      0
      0)
    object dxBarManager1Bar1: TdxBar
      AllowClose = False
      AllowCustomizing = False
      AllowQuickCustomizing = False
      AllowReset = False
      Caption = 'Custom 1'
      CaptionButtons = <>
      DockControl = dxBarDockControl1
      DockedDockControl = dxBarDockControl1
      DockedLeft = 0
      DockedTop = 0
      FloatLeft = 445
      FloatTop = 179
      FloatClientWidth = 0
      FloatClientHeight = 0
      ItemLinks = <
        item
          Visible = True
          ItemName = 'dxBarButton1'
        end
        item
          Visible = True
          ItemName = 'dxBarButton2'
        end
        item
          Visible = True
          ItemName = 'dxBarButton4'
        end
        item
          Visible = True
          ItemName = 'dxBarButton3'
        end>
      OneOnRow = True
      Row = 0
      UseOwnFont = False
      UseRestSpace = True
      Visible = True
      WholeRow = False
    end
    object dxBarManager1Bar2: TdxBar
      AllowClose = False
      AllowCustomizing = False
      AllowQuickCustomizing = False
      AllowReset = False
      Caption = 'Custom 2'
      CaptionButtons = <>
      DockControl = dxBarDockControl2
      DockedDockControl = dxBarDockControl2
      DockedLeft = 0
      DockedTop = 0
      FloatLeft = 551
      FloatTop = 183
      FloatClientWidth = 0
      FloatClientHeight = 0
      ItemLinks = <
        item
          Visible = True
          ItemName = 'bbadd'
        end
        item
          Visible = True
          ItemName = 'bbeditjl'
        end
        item
          Visible = True
          ItemName = 'bbdeljl'
        end>
      NotDocking = [dsNone, dsLeft, dsTop, dsRight, dsBottom]
      OneOnRow = True
      Row = 0
      UseOwnFont = False
      UseRestSpace = True
      Visible = True
      WholeRow = False
    end
    object dxBarButton1: TdxBarButton
      Caption = 'New Button'
      Category = 0
      Hint = 'New Button'
      Visible = ivAlways
      ImageIndex = 57
      OnClick = dxBarButton1Click
    end
    object dxBarButton2: TdxBarButton
      Caption = 'New Button'
      Category = 0
      Hint = 'New Button'
      Visible = ivAlways
      ImageIndex = 41
      OnClick = dxBarButton2Click
    end
    object dxBarButton3: TdxBarButton
      Caption = 'New Button'
      Category = 0
      Hint = 'New Button'
      Visible = ivAlways
      ImageIndex = 10
      OnClick = dxBarButton3Click
    end
    object bbnewjl: TdxBarButton
      Caption = #1053#1086#1074#1086#1077' '#1102#1088#1083#1080#1094#1086
      Category = 0
      Hint = #1053#1086#1074#1086#1077' '#1102#1088#1083#1080#1094#1086
      Visible = ivNever
      ImageIndex = 40
      PaintStyle = psCaptionGlyph
    end
    object dxBarButton4: TdxBarButton
      Caption = 'New Button'
      Category = 0
      Hint = 'New Button'
      Visible = ivAlways
      ImageIndex = 54
      OnClick = dxBarButton4Click
    end
    object bbadd: TdxBarButton
      Caption = 'New Button'
      Category = 0
      Hint = 'New Button'
      Visible = ivAlways
      ImageIndex = 57
      OnClick = bbaddClick
    end
    object bbeditjl: TdxBarButton
      Caption = 'New Button'
      Category = 0
      Hint = 'New Button'
      Visible = ivAlways
      ImageIndex = 54
      OnClick = bbeditjlClick
    end
    object bbdeljl: TdxBarButton
      Caption = 'New Button'
      Category = 0
      Hint = 'New Button'
      Visible = ivAlways
      ImageIndex = 10
      OnClick = bbdeljlClick
    end
  end
  object qSD: TIBQuery
    Database = DMInv.DBRead
    Transaction = DMInv.IBTransaction1
    AfterInsert = qSDAfterInsert
    CachedUpdates = True
    SQL.Strings = (
      'SELECT t1.sdparid, t1.sdid, t1.sdname, SD1.SDISDELETE'
      'FROM'
      '('
      'WITH   recursive'
      '   tree (SDNAME, SDID, SDPARID, o)'
      
        '   AS (SELECT SD.SDNAME, SD.SDID, sd.SDPARID, CAST('#39#39' AS VARCHAR' +
        '(2048)) AS o FROM SYS_DIC SD'
      '      WHERE sd.SDPARID = :SDPARID'
      '      UNION ALL'
      '      SELECT SD1.SDNAME, SD1.SDID, sd1.SDPARID, '#39#39' || o'
      ''
      '      FROM SYS_DIC SD1'
      '          INNER JOIN tree t '
      '           ON t.sdid = sd1.SDPARID)'
      ' SELECT  o || SDNAME AS SDNAME, SDID, SDPARID FROM tree t'
      ') AS t1'
      'INNER JOIN SYS_DIC sd1 ON sd1.SDID = t1.sdid'
      'UNION'
      'SELECT SD.SDPARID, SD.SDID, SD.SDNAME, SD.SDISDELETE'
      'FROM SYS_DIC SD'
      'WHERE SD.SDID = :SDPARID'
      'order by 1'
      ''
      ''
      '')
    UpdateObject = quSD
    GeneratorField.Field = 'SDID'
    GeneratorField.Generator = 'GEN_SYS_DIC'
    Left = 120
    Top = 88
    ParamData = <
      item
        DataType = ftUnknown
        Name = 'SDPARID'
        ParamType = ptUnknown
      end
      item
        DataType = ftUnknown
        Name = 'SDPARID'
        ParamType = ptUnknown
      end>
    object qSDSDPARID: TIntegerField
      FieldName = 'SDPARID'
      ProviderFlags = []
    end
    object qSDSDID: TIntegerField
      FieldName = 'SDID'
      ProviderFlags = []
    end
    object qSDSDNAME: TIBStringField
      FieldName = 'SDNAME'
      ProviderFlags = []
      Size = 2303
    end
    object qSDSDISDELETE: TIntegerField
      FieldName = 'SDISDELETE'
      Origin = '"SYS_DIC"."SDISDELETE"'
    end
  end
  object quSD: TIBUpdateSQL
    RefreshSQL.Strings = (
      'Select '
      '  SDID,'
      '  SDPARID,'
      '  SDNAME'
      'from SYS_DIC '
      'where'
      '  SDID = :SDID')
    ModifySQL.Strings = (
      'update SYS_DIC'
      'set'
      '  SDID = :SDID,'
      '  SDNAME = trim(leading from :SDNAME),'
      '  SDPARID = :SDPARID'
      'where'
      '  SDID = :OLD_SDID')
    InsertSQL.Strings = (
      'insert into SYS_DIC'
      '  (SDID, SDNAME, SDPARID)'
      'values'
      '  (:SDID, trim(leading from :SDNAME), :SDPARID)')
    DeleteSQL.Strings = (
      'delete from SYS_DIC'
      'where'
      '  SDID = :OLD_SDID')
    Left = 160
    Top = 88
  end
  object qChekChild: TIBQuery
    Database = DMInv.DBRead
    Transaction = DMInv.IBTransaction1
    DataSource = dlgDS
    SQL.Strings = (
      'SELECT t1.*, SD1.SDISDELETE'
      'FROM'
      '('
      'WITH   recursive'
      '   tree (SDNAME, SDID, SDPARID, o)'
      
        '   AS (SELECT SD.SDNAME, SD.SDID, sd.SDPARID, CAST('#39#39' AS VARCHAR' +
        '(2048)) AS o FROM SYS_DIC SD'
      '      WHERE sd.SDPARID = :SDID'
      '      UNION ALL'
      '      SELECT SD1.SDNAME, SD1.SDID, sd1.SDPARID, '#39' '#39' || o'
      ''
      '      FROM SYS_DIC SD1'
      '          INNER JOIN tree t '
      '           ON t.sdid = sd1.SDPARID)'
      ' SELECT  o || SDNAME AS SDNAME, SDID, SDPARID FROM tree t'
      ') AS t1'
      'INNER JOIN SYS_DIC sd1 ON sd1.SDID = t1.sdid')
    Left = 200
    Top = 88
    ParamData = <
      item
        DataType = ftUnknown
        Name = 'SDID'
        ParamType = ptUnknown
      end>
  end
  object qPeople: TIBQuery
    Database = DMInv.DBRead
    Transaction = DMInv.IBTransaction1
    DataSource = dlgDS
    SQL.Strings = (
      
        'SELECT d.DOLID, p1.plastname || '#39' '#39' || SUBSTRING(p1.pname FROM 1' +
        ' FOR 1) || '#39'. '#39' || COALESCE(SUBSTRING(p1.ppatronymic FROM 1 FOR ' +
        '1) || '#39'.'#39', '#39' '#39') AS fio'
      'FROM DOLJNOST d'
      'INNER JOIN PEOPLE P1 ON P1.PID = d.PID'
      'WHERE d.SDID = :sdid'
      'AND d.DOLISDELETE IS NULL'
      
        'AND CURRENT_DATE BETWEEN d.DOLDATEBEGIN AND COALESCE(d.DOLDATEEN' +
        'D, CURRENT_DATE)')
    Left = 200
    Top = 185
    ParamData = <
      item
        DataType = ftUnknown
        Name = 'sdid'
        ParamType = ptUnknown
      end>
    object qPeopleDOLID: TIntegerField
      FieldName = 'DOLID'
      Origin = '"DOLJNOST"."DOLID"'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
      Required = True
    end
    object qPeopleFIO: TIBStringField
      FieldName = 'FIO'
      ProviderFlags = []
      Size = 769
    end
  end
  object dsPeople: TDataSource
    DataSet = qPeople
    Left = 160
    Top = 185
  end
  object dsJL: TDataSource
    DataSet = qJL
    Left = 512
    Top = 208
  end
  object qJL: TIBQuery
    Database = DMInv.DBRead
    Transaction = DMInv.IBTransaction1
    CachedUpdates = True
    SQL.Strings = (
      'SELECT J.*, SD1.SDNAME AS opf_'
      'FROM JURLITSA J'
      'LEFT OUTER JOIN JLSDLINK l ON l.JLID = J.JLID'
      'LEFT OUTER JOIN SYS_DIC SD ON SD.SDID = l.SDID'
      'LEFT OUTER JOIN SYS_DIC SD1 ON SD1.SDID = j.JLOPFSDID'
      'where J.JLISDELETE is null'
      '')
    UpdateObject = quJL
    GeneratorField.Field = 'JLID'
    Left = 544
    Top = 208
    object qJLJLID: TIntegerField
      FieldName = 'JLID'
      Origin = '"JURLITSA"."JLID"'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
      Required = True
    end
    object qJLJLTYPE: TIntegerField
      FieldName = 'JLTYPE'
      Origin = '"JURLITSA"."JLTYPE"'
    end
    object qJLJLNOTE: TIBStringField
      FieldName = 'JLNOTE'
      Origin = '"JURLITSA"."JLNOTE"'
      Size = 255
    end
    object qJLJLUSERENTER: TIBStringField
      FieldName = 'JLUSERENTER'
      Origin = '"JURLITSA"."JLUSERENTER"'
      Size = 40
    end
    object qJLJLTIMEENTER: TDateTimeField
      FieldName = 'JLTIMEENTER'
      Origin = '"JURLITSA"."JLTIMEENTER"'
    end
    object qJLJLUSEREDIT: TIBStringField
      FieldName = 'JLUSEREDIT'
      Origin = '"JURLITSA"."JLUSEREDIT"'
      Size = 40
    end
    object qJLJLTIMEEDIT: TDateTimeField
      FieldName = 'JLTIMEEDIT'
      Origin = '"JURLITSA"."JLTIMEEDIT"'
    end
    object qJLJLEGALNAME: TIBStringField
      FieldName = 'JLEGALNAME'
      Origin = '"JURLITSA"."JLEGALNAME"'
      Size = 255
    end
    object qJLJLSYMBCODE: TIBStringField
      FieldName = 'JLSYMBCODE'
      Origin = '"JURLITSA"."JLSYMBCODE"'
      Size = 255
    end
    object qJLJLINN: TIBStringField
      FieldName = 'JLINN'
      Origin = '"JURLITSA"."JLINN"'
      Size = 12
    end
    object qJLJLOGRN: TIBStringField
      FieldName = 'JLOGRN'
      Origin = '"JURLITSA"."JLOGRN"'
      Size = 255
    end
    object qJLJLOPF: TIBStringField
      FieldName = 'JLOPF'
      Origin = '"JURLITSA"."JLOPF"'
      Size = 10
    end
    object qJLJLOPFSDID: TIntegerField
      FieldName = 'JLOPFSDID'
      Origin = '"JURLITSA"."JLOPFSDID"'
    end
    object qJLJLLEGALADRESS: TIBStringField
      FieldName = 'JLLEGALADRESS'
      Origin = '"JURLITSA"."JLLEGALADRESS"'
      Size = 255
    end
    object qJLJLCEONAME: TIBStringField
      FieldName = 'JLCEONAME'
      Origin = '"JURLITSA"."JLCEONAME"'
      Size = 255
    end
    object qJLJLISDELETE: TIntegerField
      FieldName = 'JLISDELETE'
      Origin = '"JURLITSA"."JLISDELETE"'
    end
    object qJLOPF_: TIBStringField
      FieldName = 'OPF_'
      Origin = '"SYS_DIC"."SDNAME"'
      Size = 255
    end
  end
  object quJL: TIBUpdateSQL
    RefreshSQL.Strings = (
      'Select '
      '  JLID,'
      '  JLNOTE,'
      '  JLUSERENTER,'
      '  JLTIMEENTER,'
      '  JLUSEREDIT,'
      '  JLTIMEEDIT,'
      '  JLEGALNAME,'
      '  JLINN,'
      '  JLOGRN,'
      '  JLOPF,'
      '  JLLEGALADRESS,'
      '  JLCEONAME,'
      '  JLISDELETE'
      'from JURLITSA '
      'where'
      '  JLID = :JLID')
    ModifySQL.Strings = (
      'update JURLITSA'
      'set'
      '  JLCEONAME = :JLCEONAME,'
      '  JLEGALNAME = :JLEGALNAME,'
      '  JLID = :JLID,'
      '  JLINN = :JLINN,'
      '  JLISDELETE = :JLISDELETE,'
      '  JLLEGALADRESS = :JLLEGALADRESS,'
      '  JLNOTE = :JLNOTE,'
      '  JLOGRN = :JLOGRN,'
      '  JLOPF = :JLOPF'
      'where'
      '  JLID = :OLD_JLID')
    InsertSQL.Strings = (
      'insert into JURLITSA'
      
        '  (JLCEONAME, JLEGALNAME, JLID, JLINN, JLISDELETE, JLLEGALADRESS' +
        ', JLNOTE, '
      '   JLOGRN, JLOPF)'
      'values'
      
        '  (:JLCEONAME, :JLEGALNAME, :JLID, :JLINN, :JLISDELETE, :JLLEGAL' +
        'ADRESS, '
      '   :JLNOTE, :JLOGRN, :JLOPF)')
    DeleteSQL.Strings = (
      'update JURLITSA'
      'set'
      '  JLISDELETE = 1'
      'where'
      '  JLID = :OLD_JLID')
    Left = 576
    Top = 208
  end
  object qjl_tmp: TIBQuery
    Database = DMInv.DBRead
    Transaction = DMInv.IBTransaction1
    DataSource = dlgDS
    SQL.Strings = (
      
        'SELECT J.*, SD1.SDNAME AS opf_, LIST(SD.SDNAME, '#39', '#39') AS link_sp' +
        'isok'
      'FROM JURLITSA J'
      'LEFT OUTER JOIN JLSDLINK l ON l.JLID = J.JLID'
      'LEFT OUTER JOIN SYS_DIC SD ON SD.SDID = l.SDID'
      'LEFT OUTER JOIN SYS_DIC SD1 ON SD1.SDID = j.JLOPFSDID'
      'where J.JLISDELETE is null'
      '')
    GeneratorField.Field = 'JLID'
    Left = 544
    Top = 264
    object IntegerField3: TIntegerField
      FieldName = 'JLID'
      Origin = '"JURLITSA"."JLID"'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
      Required = True
    end
    object IBStringField10: TIBStringField
      FieldName = 'JLEGALNAME'
      Origin = '"JURLITSA"."JLEGALNAME"'
      Size = 255
    end
    object IBStringField11: TIBStringField
      FieldName = 'JLNOTE'
      Origin = '"JURLITSA"."JLNOTE"'
      Size = 255
    end
    object IBStringField12: TIBStringField
      FieldName = 'JLUSERENTER'
      Origin = '"JURLITSA"."JLUSERENTER"'
      Size = 40
    end
    object DateTimeField3: TDateTimeField
      FieldName = 'JLTIMEENTER'
      Origin = '"JURLITSA"."JLTIMEENTER"'
    end
    object IBStringField13: TIBStringField
      FieldName = 'JLUSEREDIT'
      Origin = '"JURLITSA"."JLUSEREDIT"'
      Size = 40
    end
    object DateTimeField4: TDateTimeField
      FieldName = 'JLTIMEEDIT'
      Origin = '"JURLITSA"."JLTIMEEDIT"'
    end
    object IBStringField14: TIBStringField
      FieldName = 'JLINN'
      Origin = '"JURLITSA"."JLINN"'
      Size = 12
    end
    object IBStringField15: TIBStringField
      FieldName = 'JLOGRN'
      Origin = '"JURLITSA"."JLOGRN"'
      Size = 255
    end
    object IBStringField16: TIBStringField
      FieldName = 'JLOPF'
      Origin = '"JURLITSA"."JLOPF"'
      Size = 10
    end
    object IBStringField17: TIBStringField
      FieldName = 'JLLEGALADRESS'
      Origin = '"JURLITSA"."JLLEGALADRESS"'
      Size = 255
    end
    object IBStringField18: TIBStringField
      FieldName = 'JLCEONAME'
      Origin = '"JURLITSA"."JLCEONAME"'
      Size = 255
    end
    object IntegerField4: TIntegerField
      FieldName = 'JLISDELETE'
      Origin = '"JURLITSA"."JLISDELETE"'
    end
    object MemoField1: TMemoField
      FieldName = 'LINK_SPISOK'
      ProviderFlags = []
      BlobType = ftMemo
      Size = 8
    end
    object IBStringField19: TIBStringField
      FieldName = 'OPF_'
      ProviderFlags = []
      Size = 255
    end
  end
  object qTree: TIBQuery
    Database = DMInv.DBRead
    Transaction = DMInv.IBTransaction1
    DataSource = dlgDS
    SQL.Strings = (
      'SELECT LIST(t1.sdid, '#39', '#39') AS list_sdid'
      'FROM'
      '('
      'WITH   recursive'
      '   tree (SDNAME, SDID, SDPARID)'
      '   AS (SELECT SD.SDNAME, SD.SDID, sd.SDPARID FROM SYS_DIC SD'
      '      WHERE sd.SDPARID = :SDID'
      '      UNION ALL'
      '      SELECT SD1.SDNAME, SD1.SDID, sd1.SDPARID'
      ''
      '      FROM SYS_DIC SD1'
      '          INNER JOIN tree t '
      '           ON t.sdid = sd1.SDPARID)'
      ' SELECT  SDNAME, SDID, SDPARID FROM tree t'
      ') AS t1'
      'WHERE NOT EXISTS'
      '('
      'SELECT t2.sdid'
      'FROM'
      '('
      'WITH   recursive'
      '   tree (SDNAME, SDID, SDPARID)'
      '   AS (SELECT SD.SDNAME, SD.SDID, sd.SDPARID FROM SYS_DIC SD'
      '      WHERE sd.SDPARID = :SDID'
      '      UNION ALL'
      '      SELECT SD1.SDNAME, SD1.SDID, sd1.SDPARID'
      ''
      '      FROM SYS_DIC SD1'
      '          INNER JOIN tree t '
      '           ON t.sdid = sd1.SDPARID)'
      ' SELECT  SDNAME, SDID, SDPARID FROM tree t'
      ') AS t2'
      'WHERE t2.sdparid = t1.sdid'
      ')')
    Left = 200
    Top = 241
    ParamData = <
      item
        DataType = ftUnknown
        Name = 'SDID'
        ParamType = ptUnknown
      end
      item
        DataType = ftUnknown
        Name = 'SDID'
        ParamType = ptUnknown
      end>
    object qTreeLIST_SDID: TMemoField
      FieldName = 'LIST_SDID'
      ProviderFlags = []
      BlobType = ftMemo
      Size = 8
    end
  end
  object qCheckJL: TIBQuery
    Database = DMInv.DBRead
    Transaction = DMInv.IBTransaction1
    DataSource = dsJL
    SQL.Strings = (
      'SELECT CS.JLID'
      'FROM COMMON_SERV CS'
      'WHERE CS.JLID = :JLID'
      'UNION'
      'SELECT PP.PP_ID'
      'FROM PERSON_PODOTCH PP'
      'where PP.PP_ID = :JLID AND PP.PPTYPE = 5')
    Left = 544
    Top = 304
    ParamData = <
      item
        DataType = ftUnknown
        Name = 'JLID'
        ParamType = ptUnknown
      end
      item
        DataType = ftUnknown
        Name = 'JLID'
        ParamType = ptUnknown
      end>
  end
end
